<? 
	$options = $this->formFieldGetOptions($form_field->dbName, $this->viewData['form_model']); 
	$dbName = $this->formGetFieldDbName($form_field->dbName, $this->viewData['form_model']);
?>

<? 
	$fieldName = $form_field->dbName;
	$index = 0;
	foreach ($options as $value=>$name): 
		$index++;
		$description = null;
		if (is_array($name))
		{
			$keys = array_keys($name);
			$keyNum = count($keys);
			
			$originalName = $name;
			$name = !$keyNum ? $value : $keys[0];
			$description = !$keyNum ? null : $originalName[$keys[0]];
		}
		
		$fieldId = $index > 1 ? $form_model_class.'_'.$dbName.'_'.$index : $form_model_class.'_'.$dbName;
		$fieldId = $this->formGetElementId($fieldId);
?>
	<div class="option">
		<input <? if ($form_field->disabled) echo 'disabled="disabled"' ?> <?= Phpr_Form::radioState($value, $form_model->$dbName) ?> type="radio" id="<?= $fieldId ?>" name="<?= $form_model_class ?>[<?= $dbName ?>]" value="<?= h($value) ?>" class="radio"/>
		<label class="choice" for="<?= $fieldId ?>">
			<?= h($name) ?>
			<? if (strlen($description)): ?><span class="description"><?= h($description) ?></span><? endif ?>
		</label>
	</div>
<? endforeach ?>